<nz-skeleton [nzLoading]="loading" [nzActive]="true">
    <div class="table-nzbordered">
        <nz-table #rowSelectionTable [id]="tableId" nzBordered [nzLoadingDelay]="1000" [nzShowPagination]="false"
            [nzFrontPagination]="false" [nzPageSize]="selectedValue" [nzData]="bodyData"
            (nzCurrentPageDataChange)="currentPageDataChange($event)" (nzPageIndexChange)="refreshStatus()"
            (nzPageSizeChange)="refreshStatus()">
            <thead>
                <tr>
                    <th nzAlign="center" nzWidth="50px" nzShowCheckbox [(nzChecked)]="allChecked"
                        [nzIndeterminate]="indeterminate" (nzCheckedChange)="checkAll($event)"></th>
                    <th nzAlign="center" nzWidth="50px">序号</th>
                    <th nzAlign="center" *ngFor="let item of headData" [nzWidth]="item.width">{{item.name}}</th>
                </tr>
            </thead>
            <tbody>
                <tr *ngFor="let data of rowSelectionTable.data;index as i" (dblclick)="operaRow(data)">
                    <td nzAlign="center" nzShowCheckbox [nzDisabled]="data.disabled" [(nzChecked)]="data.checked"
                        (nzCheckedChange)="refreshStatus()"></td>
                    <td nzAlign="center">{{(pageValue - 1) * selectedValue + i + 1}}</td>
                    <ng-container *ngFor="let item of ObjectKeys;index as i">
                        <td nzAlign="center">
                            <ng-container [ngSwitch]="true">
                                <ng-container *ngSwitchCase="item === 'vcSkyplanrange' || item === 'newDevname' || item === 'vcWorkinfo' || item === 'vcProbdesc'">
                                    <textarea style="border:0" nz-input [nzAutosize]="{ minRows: 2, maxRows: 2 }"
                                        [(ngModel)]="data[item]"></textarea>
                                </ng-container>
                                <ng-container *ngSwitchDefault>
                                    <ng-container *ngIf="data[item];else another">
                                        {{data[item]}}
                                    </ng-container>
                                    <ng-template #another>--</ng-template>
                                </ng-container>
                            </ng-container>

                        </td>
                    </ng-container>
                </tr>
            </tbody>
        </nz-table>
    </div>
    <div class="pageWrap">
        <div class="pageSelect">
            每页
            <nz-select [(ngModel)]="selectedValue" (ngModelChange)="selectedChange()">
                <nz-option nzValue="20" nzLabel="20"></nz-option>
                <nz-option nzValue="50" nzLabel="50"></nz-option>
                <nz-option nzValue="100" nzLabel="100"></nz-option>
                <nz-option nzValue="200" nzLabel="200"></nz-option>
            </nz-select> 条&nbsp;&nbsp;&nbsp;总共<span class="pageTotal">{{pageTotal}}</span>条
        </div>
        <div class="pageInation">
            <nz-pagination [nzPageSize]="selectedValue" [nzPageIndex]="pageValue" [nzTotal]="rowTotalTable"
                (nzPageIndexChange)="rowChangeTable($event)"></nz-pagination>
        </div>
    </div>
</nz-skeleton>
